import VueRouter from "../vue-router";
import Index from "./Index.vue";
import Home from "./Home.vue";
import About from "./About.vue";
import Detail from "./Detail.vue";

export default new VueRouter({
  mode: "history",
  routes: [
    {
      path: "/",
      component: Index,
    },
    {
      path: "/home",
      component: Home,
      children: [
        {
          path: "/detail/:id",
          component: Detail,
        },
        {
          path: "/info",
          component: Detail,
        },
      ],
    },
    {
      path: "/about",
      component: About,
    },
  ],
});
